STEP 15: Finally, let's test if the user guessed the word correctly!

  • Go to and drag out If.
  • Change the test variable to guess and the test value to word.
  • Drag out Say and drop it inside the if statement. Change the string to "You guessed my word!".
  • Go to and drag out Break. Drop it inside the if statement.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)